home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_c / malloc15.zip / README.TXT < prev    next >
Text File  |  1996-04-18  |  3KB  |  62 lines

  1. Nigel Horne's malloc C. All output is via cprintf\cputs.
  2. To use just link the required object file for the memory model into your
  3. application.
  4. For the best results you should include mem.h in each source file and
  5. recompile.
  6. This is not a wrapper for the standard malloc, but features a complete drop
  7. in replacement.
  8.  
  9. Version 1.5.
  10.  
  11. DOS:
  12.     Suitable for MSC8.00c (a.k.a. MSVC 1.5)
  13. usage: cl /AS test.c dosmems.obj /link /noe
  14.  
  15. The test.c program is a program full of errors and is an example of the type
  16. common errors that the package traps. They are not examples of how to
  17. modify your code! So try compiling as in the example and you'll see some
  18. error messages appear - these are the incorrect program lines in test.c which
  19. the package has noticed and is telling you. It's an example only.
  20.  
  21. Now copy dosmem?.obj and mem.h to your source directory, add #include "mem.h"
  22. to all of your .c files, ensure that dosmem?.obj (where ? is the memory
  23. model you're using) is linked in and voila, the memory package has been
  24. included in your program, so if yours has any errors similar to that in
  25. test.c you'll see them. All error messages go to stderr.
  26. Choose the correct .obj for the modem you're using dosmemS.obj is suitable for
  27. both small and tiny models.
  28.  
  29. SCO Unix:
  30. Contains mem.o which you should link with your application,
  31. and mem.h which you can optionally include in each .c file. This would be
  32. the best action as then mem.o will be better at finding which file has
  33. gone wrong. The included test.c shows some common problems. To test all
  34. is well I suggest you try "cc test.c mem.o -link -z" and see look at the
  35. output. Do not link with the shared library "-lc_s" option, as this will
  36. cause conflicts with the library.
  37. This has been tested on SCO3.2v4.2 with both the standard development system
  38. and with gcc version 2.7.0.
  39.  
  40. HP\UX:
  41. As SCO Unix.
  42. This is compiled for an HP9000/827 running HPUX A.08.02E.
  43.  
  44. SunOS:
  45. mem.o was compiled using gcc version 2.7.0 on sunos 4.1.4. If you're using
  46. gcc remember that it puts some functions inline.
  47.  
  48. AIX:
  49. You do not want builtins. Use
  50. cc -O2 -roconst -U__STR__ -qlanglvl=ansi *.c
  51.  
  52. See also mem.h.
  53.  
  54. Internet: njh@smsltd.demon.co.uk; Fidonet: Nigel Horne @ 2:2502/21.10;
  55. Packet: G0LOV@GB7SYP.#19.GBR.EDU; Phone: +44-1226-283021.
  56.  
  57. This is shareware. Registration for personal use costs only #10 sterling and
  58. is available from J. Bailey, 8 Hild Ave. Cudworth, Barnsley, S. Yorks.
  59. For information regarding corporate licencing please contact the author.
  60.  
  61. Upon registration you'll receive a free upgrade and support.
  62.